#include "EditorAudioPageModel.h"
#include "Window/EditorWindowGroupModel.h"
#include "Audio/Audio.h"

TSharedObjectPtr<REditorPageModel> REditorAudioPageModel::ShareClone(RObject *InOwner) const
{
    auto NewModel = NewObject<REditorAudioPageModel>(InOwner);
    NewModel->Audio = Audio;
    NewModel->FilePath = FilePath;
    return NewModel;
}

TSharedObjectPtr<RObject> REditorAudioPageModel::GetFocuseObject() const
{
    return Audio;
}

TSharedObjectPtr<REditorAudioPageModel> REditorAudioPageModel::Create(const SPath &InFilePath, TSharedObjectPtr<RAudio> InAudio)
{
    TSharedObjectPtr<REditorAudioPageModel> NewPageModel = NewObject<REditorAudioPageModel>(REditorWindowGroupModel::Get());
    NewPageModel->Audio = InAudio;
    NewPageModel->FilePath = InFilePath;
    return NewPageModel;
}

TSharedObjectPtr<RAudio> REditorAudioPageModel::GetAudio() const
{
    return Audio;
}
